Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create new vsc modification #420

Merged
merged 24 commits into from
Mar 7, 2024
Merged

create new vsc modification #420

merged 24 commits into from
Mar 7, 2024

Conversation

jamal-khey
Copy link
Contributor

No description provided.

@jamal-khey jamal-khey changed the title create vsc modification WIP create vsc modification Jan 19, 2024
@jamal-khey jamal-khey changed the title WIP create vsc modification create new vsc modification Jan 25, 2024
@jamal-khey jamal-khey force-pushed the jamalkhey/vsc-modification branch from 5ade272 to ff2845a Compare January 25, 2024 15:19
implement apply for vscConverterStation and add tests

create a specific test network for vsc modification

implement modification for reactive limite

attribut in hvdc line are set correctly
Refactor VscModificationEntity and VscModificationTest
Update VSC Modification and Converter Station Entities

Update database changelog and entity class

Add ConverterStationModificationInfos class and modify VscModificationInfos class

Add MODIFY_CONVERTER_STATION_ERROR to NetworkModificationException class

some attributes can be updated
Update VscModificationEntity and VscModification classes

progress , fixing some failing tests

work in progress, tests are failing due to table does not existe

Signed-off-by: jamal-khey <myjamal89@gmail.com>
@jamal-khey jamal-khey force-pushed the jamalkhey/vsc-modification branch from 908a57d to 856ce0c Compare January 30, 2024 08:32
Signed-off-by: jamal-khey <myjamal89@gmail.com>
@jamal-khey jamal-khey changed the title create new vsc modification WIP create new vsc modification Feb 8, 2024
@jamal-khey jamal-khey changed the title WIP create new vsc modification create new vsc modification Feb 15, 2024
@lilian-houdelet lilian-houdelet self-requested a review February 15, 2024 13:32
value.getQmaxP(), value.getOldQmaxP(),
value.getP(), value.getOldP()))
.toList() : null;
}
Copy link
Contributor

@YenguiSeddik YenguiSeddik Feb 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can be done like this i think
public static List convertToReactiveCapabilityCurveModificationInfos(List rCCpoints) {
return CollectionUtils.isEmpty(rCCpoints) ? List.of() : rCCpoints
.stream()
.map(value -> new ReactiveCapabilityCurveModificationInfos(value.getQminP(), value.getOldQminP(),
value.getQmaxP(), value.getOldQmaxP(),
value.getP(), value.getOldP()))
.toList();
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done , i juste replaced 'List.of()' in your suggestion by 'null'

List<ReactiveCapabilityCurveModificationInfos> modificationPoints = converterStationModificationInfos.getReactiveCapabilityCurvePoints();
if (modificationPoints != null) {
ModificationUtils.getInstance().checkMaxQGreaterThanMinQ(modificationPoints, MODIFY_BATTERY_ERROR, errorMessage);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code block (line 39 -> 47) is repeated in GeneratorModification and BatteryModification. Maybe add a method in ModificationUtils and call it in the 3 classes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

import com.powsybl.iidm.network.ReactiveCapabilityCurveAdder;
import com.powsybl.iidm.network.ReactiveLimits;
import com.powsybl.iidm.network.ReactiveLimitsKind;
import com.powsybl.iidm.network.*;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe you shouldn't use wildcard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Signed-off-by: jamal-khey <myjamal89@gmail.com>
Signed-off-by: jamal-khey <myjamal89@gmail.com>
fix logs in converter station

Signed-off-by: jamal-khey <myjamal89@gmail.com>
Signed-off-by: jamal-khey <myjamal89@gmail.com>
Signed-off-by: jamal-khey <myjamal89@gmail.com>
@jamal-khey jamal-khey self-assigned this Mar 6, 2024
Copy link

sonarqubecloud bot commented Mar 7, 2024

@jamal-khey jamal-khey merged commit 34fbf48 into main Mar 7, 2024
3 checks passed
@jamal-khey jamal-khey deleted the jamalkhey/vsc-modification branch March 7, 2024 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants